package viewcomponents;

import java.awt.Dimension;
import java.io.IOException;

import javax.swing.*;

import controller.Controller;

public class SLogoTabManager extends JTabbedPane {
	
	//private SLogoTabManager myTabManager;
	//private int DEFAULT_TAB_SIZE = 620;
	
	private Controller myController;
	
	public SLogoTabManager(String tabName) throws IOException 
	{
		//myTabManager = this;
		//setPreferredSize(new Dimension(DEFAULT_TAB_SIZE,
          //      DEFAULT_TAB_SIZE));
		myController = new Controller();
		addTab(tabName);
		setVisible(true);
	}
	
	public SLogoTabManager(String tabName, Controller controller)
	{
		myController = controller;
		addTab(tabName);
		setVisible(true);
	}
	
	/*
	public SLogoTabManager getTabManager() 
	{
		return myTabManager;
	}
	*/
	
	public void setSize(Dimension dimension) {
		setPreferredSize(dimension);
	}
	
	public void addTab(String tabName) {
		addTab(tabName, new SLogoCanvas(myController));
	}
	
	public String getInput() {
		SLogoCanvas canvas = (SLogoCanvas) getSelectedComponent();
		return canvas.getInput();
	}
	
	public void removeTab() {
		
	}
	
	
}
